From 37321f6fb82ab21a21f4c14ce76df24b059bdc54 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Thu, 7 Aug 2014 23:02:13 +0800 Subject: [PATCH] MSVC Builds: Apply Visual Style for Win32 Print Dialog Define ISOLATION_AWARE_ENABLED for the build of the GTK DLL so that visual style can be applied to the Windows print dialog for all applications using gtkprintoperation. Update the script for the generation of gtk-win32.rc for MSVC to not try to embed the manifest from it (but embed libgtk3.manifest by including it in the project files, as we are now doing), and embedding the manifest file is really not supported in MSVC 2010 and later. Also fix up formatting in the GTK DLL projects. https://bugzilla.gnome.org/show_bug.cgi?id=733773 --- build/win32/process-in-win32.py | 12 +++++++++++- build/win32/vs10/gtk-build-defines.props | 4 ++-- build/win32/vs10/gtk.vcxprojin | 14 +++++++------- build/win32/vs9/gtk-build-defines.vsprops | 4 ++-- build/win32/vs9/gtk.vcprojin | 2 +- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/build/win32/process-in-win32.py b/build/win32/process-in-win32.py index ca5c80ad48..86be09a587 100644 --- a/build/win32/process-in-win32.py +++ b/build/win32/process-in-win32.py @@ -79,9 +79,19 @@ def main(argv): ver = get_version(srcroot) + target = os.path.join(srcroot, 'gtk', 'gtk-win32.rc') process_in(os.path.join(srcroot, 'gtk', 'gtk-win32.rc.in'), - os.path.join(srcroot, 'gtk', 'gtk-win32.rc'), + target + '.intermediate', ver) + fp_r = open_compat(target + '.intermediate', 'r') + lines = fp_r.readlines() + fp_r.close() + fp_w = open_compat(target, 'w') + fp_w.writelines([item for item in lines[:-1]]) + + fp_w.close() + os.unlink(target + '.intermediate') + no_args = False if args.gtk3manifest is not None: diff --git a/build/win32/vs10/gtk-build-defines.props b/build/win32/vs10/gtk-build-defines.props index c79f19b26c..6bc67ec2d6 100644 --- a/build/win32/vs10/gtk-build-defines.props +++ b/build/win32/vs10/gtk-build-defines.props @@ -9,7 +9,7 @@ GTK_PREFIX=\"$(GtkDummyPrefix)\" GDK_COMPILATION;G_LOG_DOMAIN="Gdk" INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr - GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_PREVIEW_COMMAND="undefined-gtk-print-preview-command";$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED + GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_PREVIEW_COMMAND="undefined-gtk-print-preview-command";$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED <_PropertySheetDisplayName>gtkbuilddefinesprops @@ -47,4 +47,4 @@ $(GtkDefines) - \ No newline at end of file + diff --git a/build/win32/vs10/gtk.vcxprojin b/build/win32/vs10/gtk.vcxprojin index dd4213b4d7..c90d603112 100644 --- a/build/win32/vs10/gtk.vcxprojin +++ b/build/win32/vs10/gtk.vcxprojin @@ -176,16 +176,16 @@ Generating GTK+ Win32 Version Resource... $(GenerateGtkWin32RC) - ..\..\..\gtk\gtk-win32.rc;%(Outputs) + ..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs) Generating GTK+ Win32 Version Resource... $(GenerateGtkWin32RC) - ..\..\..\gtk\gtk-win32.rc;%(Outputs) + ..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs) Generating GTK+ Win32 Version Resource... $(GenerateGtkWin32RC) - ..\..\..\gtk\gtk-win32.rc;%(Outputs) + ..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs) Generating GTK+ Win32 Version Resource... $(GenerateGtkWin32RC) - ..\..\..\gtk\gtk-win32.rc;%(Outputs) + ..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs) @@ -209,6 +209,9 @@ + + + {fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7} @@ -219,9 +222,6 @@ false - - - diff --git a/build/win32/vs9/gtk-build-defines.vsprops b/build/win32/vs9/gtk-build-defines.vsprops index 40214a61d7..733474de4c 100644 --- a/build/win32/vs9/gtk-build-defines.vsprops +++ b/build/win32/vs9/gtk-build-defines.vsprops @@ -40,6 +40,6 @@ /> - \ No newline at end of file + diff --git a/build/win32/vs9/gtk.vcprojin b/build/win32/vs9/gtk.vcprojin index 5e574a22e5..3aa923f578 100644 --- a/build/win32/vs9/gtk.vcprojin +++ b/build/win32/vs9/gtk.vcprojin @@ -223,7 +223,7 @@ - +